package com.example.compositepattern.entity;

/**
 * @author ash
 * @description
 * @create 2023/2/20  22:09:07
 * @className Component
 * @verson 1.0.0
 */
public abstract class Component {

    public String name;

    public Component(String name) {
        this.name = name;
    }

    //添加
  public abstract void add(Component component);
    //移除
    public abstract void remove(Component component);
    //显示
    public abstract void display(int depth);
}
